/**
 * 
 */

package com.wutianyi.arithmetic;

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * 消息摘要
 * @author wutianyi
 * 
 */
public class MyMessageDigest {

	public static void main(String[] args) throws UnsupportedEncodingException, NoSuchAlgorithmException {
		String message = "wutianyi_test";
		byte[] messageByte = message.getBytes("utf8");
		MessageDigest digest = MessageDigest.getInstance("MD5");
		System.out.println(digest.getProvider().getInfo());
		digest.update(messageByte);
		System.out.println(new String(digest.digest(), "utf8"));
	}
}
